<div class="summary">
<% for k, v in params %>
  <% v.each do |vv| %>
    <% if vv.is_a? Hash %>
      <% if vv.has_key? '_object' and (object = get_param(vv['_object'], @device)) != nil %>
        <h2><%= k %></h2>
        <%= render partial: 'object_table', locals: {params: vv, object: object} %>
        <% break %>
      <% end %>
    <% else %>
      <% if (p = get_param(vv, @device)) != nil %>
        <p>
          <strong><%= k %>:</strong>
          <%= param_value(vv, @device) %>
          <% if p['_writable'] and can_edit_parameters %>
            &mdash;
            <% options = Rails.configuration.parameters_edit[p['_path'].gsub(/\.\d+\./, '..')] %>
            <a href="#" onclick='editParam("<%= vv %>", "<%= p['_type'] %>", <%= p['_value'].to_json.html_safe %>, <%= options.to_json.html_safe %>);return false;'>Edit</a>
          <% end %>
        </p>
        <% break %>
      <% end %>
    <% end %>
  <% end %>
<% end %>
</div>
